import uvicorn
from typing import Union
from pydantic import BaseModel
from fastapi import FastAPI

app = FastAPI()

class Item(BaseModel):
    name: str
    price: float
    is_offer: Union[str, None]


@app.get('/user/{user_id}')
def get_user(user_id: int):
    return f"This is the user for {user_id}. "

@app.put('/item/{item_id}')
def put_item(item_id: str , item: Item):
    return {'The Item is ': item.name, 'Item id is': item_id}

if __name__ == "__main__":
    uvicorn.run(app="path_params:app", reload=True)